package com.xinsoft.entity.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.xinsoft.common.Tree;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * BOM主表
 * @TableName mes_bom
 */
@Data
public class MesBomImportDTO implements Serializable {

    /**
     * 序号
     */
    @Excel(name = "序号")
    private Integer num;

    /**
     * 父序号
     */

    @NotNull(message = "父序号不能为空！")
    @Excel(name = "父序号")
    private Integer parentNum;

    /**
     *  层级
     */
    @Excel(name = "层级")
    private Integer level;

    /**
     * bom编号
     */
    @NotEmpty(message = "BOM编码不能为空！")
    @Excel(name = "BOM编码")
    private String bomNo;

    /**
     * BOM名称
     */
    @NotEmpty(message = "BOM名称不能为空！")
    @Excel(name = "BOM名称")
    private String bomName;

    /**
     * BOM类别
     */
    private Integer bomType;

    /**
     * BOM类别
     */
    @Excel(name = "BOM类别")
    private String bomTypeName;

    /**
     * BOM版本
     */
    @Excel(name = "BOM版本")
    private String bomVersion;

    /**
     * 产品ID
     */
    private Integer materialId;

    /**
     * 产品名称
     */
    @Excel(name = "产品名称")
    private String materialName;


    /**
     * 产品编号
     */
    private String materialNo;


    /**
     * 产品规格
     */
    private String materialSpecific;


    /**
     * 生产数量
     */
    private BigDecimal produceNum;

    /**
     * 图号
     mes_bom_detail
     */
    @Excel(name = "图号")
    private String drawingNo;

    /**
     * 标准用量
     */

    @NotNull(message = "数量不能为空！")
    @Excel(name = "数量")
    private BigDecimal standardCount;

    /**
     * 工序
     */
    @Excel(name = "工序")
    private String processName;

    /**
     * 工序id
     */
    private Integer processId;

    /**
     * 工位名称
     */
    @Excel(name = "工位")
    private String stationName;

    /**
     * 工位id
     */
    private String stationId;

    /**
     * 仓库
     */
    @Excel(name = "发料仓库")
    private String warehouseName;

    /**
     * 仓库id
     */
    private Integer warehouseId;

    /**
     * 库位
     */
    @Excel(name = "发料仓位")
    private String warehItemName;

    /**
     * 库位
     */
    private Integer warehItemId;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remarks;

    /**
     * 审核人
     */
    private Integer auditId;

    /**
     * 审核人
     */
    private String auditName;

    /**
     * 审核状态 0-未审核 1-已审核
     */
    private Integer auditStatus;

    /**
     * 明细行id
     */
    private Integer detailId;

    /**
     * bom树
     */
    private Tree<MesBomDetailDTO> bomTree;
}